<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="http://paranoid.net.cn/semantic.css" >
</head>
<body>
<section-title-en>2.3 Software Privilege Levels</section-title-en>
<section-title-ch>2.3 软件权限级别</section-title-ch>
<p-en>
	In an Infrastructure-as-a-Service (IaaS) cloud environment, such as Amazon EC2, commodity CPUs run software at four different privilege levels, shown in Figure 8.
</p-en>
<p-ch>
	在基础设施即服务（IaaS）云环境中，如Amazon EC2，商品CPU以四种不同的权限级别运行软件，如图8所示。
</p-ch>
<img src="fig.8.jpg" />
<p-en>
	Figure 8: The privilege levels in the x86 architecture, and the software that typically runs at each security level.
</p-en>
<p-ch>
	图8：x86架构中的特权级别，以及通常在每个安全级别上运行的软件。
</p-ch>
<p-en>
	Each privilege level is strictly more powerful than the ones below it, so a piece of software can freely read and modify the code and data running at less privileged levels. Therefore, a software module can be compromised by any piece of software running at a higher privilege level. It follows that a software module implicitly trusts all the software running at more privileged levels, and a system's security analysis must take into account the software at all privilege levels.
</p-en>
<p-ch>
	每一个特权级别都严格地比下面的特权级别更强大，所以一个软件可以自由地读取和修改在较低特权级别上运行的代码和数据。因此，一个软件模块可以被任何运行在较高权限级别的软件所破坏。因此，一个软件模块隐含着对所有运行在较高权限级别的软件的信任，系统的安全分析必须考虑到所有权限级别的软件。
</p-ch>
<p-en>
	System Management Mode (SMM) is intended for use by the motherboard manufacturers to implement features such as fan control and deep sleep, and/or to emulate missing hardware. Therefore, the bootstrapping software (§2.13) in the computer's firmware is responsible for setting up a continuous subset of DRAM as System Management RAM (SMRAM), and for loading all the code that needs to run in SMM mode into SMRAM. The SMRAM enjoys special hardware protections that prevent less privileged software from accessing the SMM code.
</p-en>
<p-ch>
	系统管理模式(SMM)是由主板厂商用来实现风扇控制和深度睡眠等功能，和/或模拟缺失的硬件。因此，计算机固件中的启动软件(§2.13)负责将DRAM的一个连续子集设置为系统管理RAM(SMRAM)，并将所有需要在SMM模式下运行的代码加载到SMRAM中。SMRAM享有特殊的硬件保护，防止权限较低的软件访问SMM代码。
</p-ch>
<p-en>
	IaaS cloud providers allow their customers to run their operating system of choice in a virtualized environment. Hardware virtualization [181], called Virtual Machine Extensions (VMX) by Intel, adds support for a hypervisor, also called a Virtual Machine Monitor (VMM) in the Intel documentation. The hypervisor runs at a higher privilege level (VMX root mode) than the operating system, and is responsible for allocating hardware resources across multiple operating systems that share the same physical machine. The hypervisor uses the CPU's hardware virtualization features to make each operating system believe it is running in its own computer, called a virtual machine (VM). Hypervisor code generally runs at ring 0 in VMX root mode.
</p-en>
<p-ch>
	IaaS云提供商允许其客户在虚拟化环境中运行他们选择的操作系统。硬件虚拟化[181]被英特尔称为虚拟机扩展(VMX)，增加了对管理程序的支持，在英特尔文档中也称为虚拟机监视器(VMM)。管理程序以比操作系统更高的权限级别（VMX根模式）运行，负责在共享同一物理机的多个操作系统之间分配硬件资源。管理程序利用CPU的硬件虚拟化特性，使每个操作系统都认为自己是在自己的计算机中运行，称为虚拟机（VM）。管理程序代码一般运行在VMX根模式下的0环。
</p-ch>
<p-en>
	Hypervisors that run in VMX root mode and take advantage of hardware virtualization generally have better performance and a smaller codebase than hypervisors based on binary translation [161].
</p-en>
<p-ch>
	与基于二进制翻译的管理程序相比，在VMX根模式下运行并利用硬件虚拟化的管理程序一般具有更好的性能和更小的代码库[161]。
</p-ch>
<p-en>
	The systems research literature recommends breaking up an operating system into a small kernel, which runs at a high privilege level, known as the kernel mode or supervisor mode and, in the Intel architecture, as ring 0. The kernel allocates the computer's resources to the other system components, such as device drivers and services, which run at lower privilege levels. However, for performance reasons1, mainstream operating systems have large amounts of code running at ring 0. Their monolithic kernels include device drivers, filesystem code, networking stacks, and video rendering functionality.
</p-en>
<p-ch>
	系统研究文献建议将一个操作系统分解成一个小内核，这个内核以高权限级别运行，称为内核模式或主管模式，在英特尔架构中，称为0环，内核将计算机的资源分配给其他系统组件，如设备驱动程序和服务，这些组件以较低的权限级别运行。但是，出于性能的考虑1，主流的操作系统都有大量的代码运行在环0上，它们的宏内核包括设备驱动程序、文件系统代码、网络堆栈和视频渲染功能。
</p-ch>
<p-en>
	Application code, such as a Web server or a game client, runs at the lowest privilege level, referred to as user mode (ring 3 in the Intel architecture). In IaaS cloud environments, the virtual machine images provided by customers run in VMX non-root mode, so the kernel runs in VMX non-root ring 0, and the application code runs in VMX non-root ring 3.
</p-en>
<p-ch>
	应用代码，如Web服务器或游戏客户端，运行在最低的权限级别，称为用户模式（英特尔架构中的环3）。在IaaS云环境中，客户提供的虚拟机镜像以VMX非root模式运行，因此内核运行在VMX非root环0，应用代码运行在VMX非root环3。
</p-ch>


</body>
</html>	